<?php

namespace App\Http\Controllers\admin;

use App\Dao\BillsDao;
use App\Dao\BillsScoreDao;
use App\Dao\RechargeDao;
use App\Http\Controllers\user\BaseController;
use App\Services\Code;

class BillsController extends BaseController
{
    public function bills()
    {
        if(getIsHasPage()){
            $params = request()->all();
            return  Code::message('',200,BillsDao::pageinate($params));
        }
        return view('admin.bills.bills');
    }

    public function bills_score()
    {
        if(getIsHasPage()){
            $params = request()->all();
            return  Code::message('',200,BillsScoreDao::pageinate($params));
        }
        return view('admin.bills.bills_score');
    }

    public function recharge_orders()
    {
        if(getIsHasPage()){
            return  Code::message('',200,RechargeDao::pageinage(request()->all()));
        }
        return view('admin.bills.recharge_orders');
    }

    public function recharge_audit()
    {
        if(isPost()){
            $params = request()->all();
            RechargeDao::recharge_audit($params);
            return  Code::message('',200);
        }
        return view('admin.bills.recharge_audit',[
            'info'=>RechargeDao::info(request()->all())
        ]);
    }



}
